<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>订单</title>
    <link rel="icon" type="image/png" sizes="16x16" href="../../static/icons/favicon.svg">
    <link rel="stylesheet" href="{{ url_for('static', filename='base.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='user/css/home.css') }}">
    <link rel="stylesheet" href="../../static/user/css/order.css">
    <script src="../../static/jQuery.js"></script>
    <script src="../../static/user/js/nav.js"></script>
    <script src="../../static/user/js/order.js"></script>
</head>
<body>

<!-- header section strats -->
<div class="header">
    <div class="w">
        <a class="index" href="{{ url_for('user.index') }}">
            <span>
              Store
            </span>
        </a>
        <ul class="list">
            <li class="part">
                <a class="link" href="{{ url_for('user.index') }}">首页</a>
            </li>
            <li class="part">
                <a class="link" href="{{ url_for('user.car') }}">购物车</a>
            </li>
            <li class="part curr">
                <a class="link" href="{{ url_for('user.orders') }}">我的订单</a>
            </li>
            <li class="part">
                <a class="link" href="{{ url_for('user.about') }}">全部商品</a>
            </li>
            <li class="part search-li">
                <form action="{{ url_for('user.search') }}" method="get">
                    <input class="search" type="text" name="keyword" value="" placeholder="书名/作者名">
                    <button type="submit">
                        <img class="search-icon" style="width: 20px;height: 20px;" src="../../static/icons/search.svg">
                    </button>
                </form>
            </li>
            <li class="part">
                {% if user %}
                <a href="javascript:;" class="logout">
                    欢迎，{{ user.name }}
                </a>
                {% else %}
                <a class="link" href="{{ url_for('user.login') }}">
                    登录
                </a>
                {% endif %}
            </li>
        </ul>
    </div>
</div>
<!-- end header section -->


<!--列表开始-->
<div class="items w">
    <ul>
        {% if items %}
        {% for item in items %}
        <li data-id="{{item.item_id}}">
            <img src="{{item.photo}}" alt="">
            <div class="detail">
                <p class="xinxi">
                    {{item.book_name}} <span> 作者：{{item.book_author}} </span><span> 商品数量：{{item.number}}&nbsp;&nbsp;总价格：{{ item.number * item.price | float }}</span>
                </p>
                <p class="miaoshu">{{item.desc}}</p>
            </div>
            <div class="icon">
                {% if item.is_cancel==1 %}
                <img src="../../static/icons/cancel.svg" alt="">
                {% elif item.is_pay==0 %}
                <img src="../../static/icons/not_pay.svg" alt="">
                {% elif item.is_pay==1 %}
                <img src="../../static/icons/finish.svg" alt="">
                {% endif %}
                <a href="javascript:;" class="delete-item">删除</a>
            </div>
        </li>
        {% endfor %}
        {% else %}
        <div class="space">暂无订单</div>
        {% endif %}
    </ul>

</div>
<!--列表开始-->
</body>
</html>